Image processing device and image processing method

ABSTRACT

According to a fine line detection processing, when for a subject pixel to be subjected to the fine line detection processing, a 3×3 matrix area centered on this subject pixel is set as a subject area. Point values “0” to “8” are assigned to the matrix elements constituting this 3×3 matrix subject area. Then, three pixels with the first, second, and third lowest brightness values are extracted from the subject area. When the total point value of the three extracted pixels is equal to “12”, the extracted pixels are determined as being in a connected state. Then, an intermediate value is calculated from the minimum and maximum values of brightness (Y) of pixels in the subject area. When the number of pixels with a brightness (Y) value smaller than the intermediate value is less than 4, the subject pixel is determined as being a fine-line pixel. A fine-line code is added to the subject pixel that is determined as being a fine-line pixel. By the fine line detection processing, even a one-dot fine line, which is difficult to detect during the edge part detection, can be detected with certitude.

BACKGROUND OF TEE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to an image processing device and image processing method

[0003] 2. Description of Related Art

[0004] Image processing devices, such as color copiers, create color images by controlling a scanner to read an image and by controlling an ink-jet printer to print the read image.

[0005] Normally, the scanner employs a line sensor such as a CCD line sensor or a CIS (Contact Image Sensor) line sensor. The line sensor converts the read image into analog electrical signals. The analog electrical signals are converted into digital signals, and print data is produced based on the digital signals, The ink jet printer performs printing based on the print data to reproduce the original image.

[0006] Especially in a color copier that performs full-color image reproduction, the line sensor includes a R-line sensor unit for red, a G-line sensor unit for green, and a B-line sensor unit for blue. When the line sensor reads a color image on a document line by line, each line sensor unit reads the color image line by line and detects a corresponding color component of the image. Thus, each line sensor unit produces a successive groups of corresponding color-component image data for successive lines read by the subject line sensor unit. After being digitized, three groups of red, green, and blue image data indicative of the same line image are converted together into a group of print data for reproducing the color of the subject line image.

[0007] It is noted that when the ink-jet printer contains cyan, magenta, and yellow inks, the group of print data is made up from print data for cyan, magenta, and yellow. When the ink-jet printer contains cyan, magenta, yellow, and black ink, the group of print data is made up from print data for cyan, magenta, yellow, and black. Print data for each ink is compared with a threshold and binarized into dot-forming data or non-dot forming data according to the comparison results. The ink-jet printer prints each line image by selectively ejecting ink of various colors based on the corresponding print data group, thereby selectively superimposing the various inks. The read image is reproduced in this way.

SUMMARY OF THE INVENTION

[0008] However, when image reading is executed using the CDD, CIS, or similar reading device, color misalignment occurs due to various factors, including: mechanical vibration, chromatic aberration of the lens employed in the reading device, difference in MTF, and feed precision.

[0009] If read positions by the R-, G-, and B-line sensor units are slightly shifted from one another, the R-, G-, and B-line sensor units produce red, green, and blue image data groups based on different lines. In such a case, if print data is obtained based on these red, green, and blue image data and ink ejection operation is executed by the print data, chromatic color ink bleeding will occur in the area in which the misaligned print data is reproduced. Especially, definition or clearness of black characters is deteriorated when chromatic color ink bleeding occurs in the vicinity of the characters.

[0010] It is additionally noted that in an image, a black character is normally located adjacent to a background color, but is not located adjacent to a solid black area. Accordingly, the peripheral portion in the character is detected as being lighter than its actual density by the reading device.

[0011] Because the black character is ordinarily made up from thin or fine portions, the entire portion of the character is detected as lighter than its actual density. Accordingly, the reading device fails to read the color of the black character as perfectly black.

[0012] Because the read data erroneously indicates the density of the black character as lighter than the actual density, if the read data is converted into print data and the print data is binarized into dot-forming data or non-dot forming data by the normally-used threshold, the black character will be printed at an erroneously-reduced contrast with respect to the background.

[0013] It is conceivable to decrease the amount of the threshold in order to ensure that the black character will be outputted with a high-density black. However, in such a case, black tonal representation will be erroneously shifted to a lower (black) side and will be deteriorated. Black spots will become noticeable in low density regions.

[0014] In this way, if the copier processes black characters in the same manner as other images, the quality of the resultant print image is deteriorated.

[0015] It is therefore conceivable to process the black characters separately from other image portions. It is conceivable to extract the black characters by executing an achromatic area judgment and an edge detection. During the achromatic area judgment, it is conceivable to compare, with a threshold, color components obtained by the line sensor, and then extract an achromatic area that has small chroma component from the image. During the edge detection, it is conceivable to use Sobel filters. However, it is impossible to detect one-dot fine line by the edge detection.

[0016] In view of the above-described drawbacks, it is an objective of the present invention to provide an image processing device and image processing method that can detect fine lines, especially one-dot fine lines, and therefore that can output fine lines, such as fine-lines in black characters, with a high image quality.

[0017] In order to attain the above and other objects, the present invention provides an image processing device, comprising: data receiving means for receiving a plurality of sets of digital input signals for a plurality of pixels that constitute a desired image; subject area setting means for setting a subject area that is formed from several pixels that include a subject pixel to be processed and that are arranged adjacent to one another, the subject pixel being located at a center of the subject area; pixel extracting means for extracting, from the subject area, a first predetermined number of pixels while remaining a second predetermined number of pixels not extracted in the subject area, each of the first predetermined number and the second predetermined number being greater than one, the total number of the first and second predetermined numbers being equal to the total number of the several pixels within the subject area, brightness of the extracted pixels being smaller than or equal to that of the non-extracted pixels; connected-state judging means for judging whether or not the extracted pixels are connected; and fine-line part determining means for determining that the subject pixel is in a fine-line part when the extracted several pixels are judged to be in a connected state.

[0018] According to another aspect, the present invention provides an image processing method, comprising: receiving a plurality of sets of digital input signals for a plurality of pixels that constitute a desired image; setting a subject area that is formed from several pixels that include a subject pixel to be processed and that are arranged adjacent to one another, the subject pixel being located at a center of the subject area; extracting, from the subject area, a first predetermined number of pixels while remaining a second predetermined number of pixels not extracted in the subject area, each of the first predetermined number and the second predetermined number being greater than one, the total number of the first and second predetermined numbers being equal to the total number of the several pixels within the subject area, brightness of the extracted pixels being smaller than or equal to that of the non-extracted pixels; judging whether or not the extracted pixels are connected; and determining that the subject pixel is in a fine-line part when the extracted several pixels are judged to be in a connected state.

BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other objects, features and advantages of the invention will become more apparent from reading the. following description of the preferred embodiment taken in connection with the accompanying drawings in which:

[0020]FIG. 1 is a perspective view of a color copier according to an embodiment of the present invention;

[0021]FIG. 2 is a block diagram of an electrical circuit configuration the color copier of FIG. 1;

[0022]FIG. 3A illustrates how intensity of R, G, and B color components of light reflected from a one-dot fine-line part of a black character is detected for X-coordinates X1-X5;

[0023]FIG. 3B illustrates how R, G, and B digital data is obtained for X-coordinates X1-X5 and Y-coordinates Y1-Y5 based on R, G, and B analog color signals indicative of the light intensities of FIG. 3A;

[0024]FIG. 4 is a block diagram showing the electrical configuration of a black character detection circuit in the color copier;

[0025]FIG. 5A is an explanatory diagram illustrating an example of a pair of Sobel filters;

[0026]FIG. 5B is an explanatory diagram illustrating an example of Y data at coordinates of (X1, Y1) to (X3, Y3) in an original image;

[0027]FIG. 6 is a flowchart of image read processing executed by a main-unit-side control board of FIG. 2;

[0028]FIG. 7 is a flowchart of RGB data conversion processing executed by an RGB data conversion circuit shown in FIG. 2;

[0029]FIG. 8 is a flowchart of black generation processing executed in the RGB data conversion processing of FIG. 7;

[0030]FIG. 9 is a flowchart of black character detection processing executed within the RGB data conversion processing of FIG. 7;

[0031]FIG. 10 illustrates how a pixel in an edge part is detected during the black character detection processing of FIG. 9;

[0032]FIG. 11 illustrates how a pixel in a fine-line part is detected during the black character detection processing of FIG. 9;

[0033]FIG. 12 is a flowchart of fine line detection processing executed within the black character detection processing of FIG. 9;

[0034]FIG. 13 illustrates how a pixel in a fine-line part is detected during the fine line detection processing of FIG. 12;

[0035]FIG. 14 is a flowchart of a first modification of the black character detection processing;

[0036]FIG. 15 is a flowchart of a second modification of the fine line detection processing; and

[0037]FIG. 16 illustrates how a pixel in a fine-line part is detected during the fine line detection processing of FIG. 15; and

[0038]FIG. 17 is a flowchart of a third modification of the fine line detection processing.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0039] An image processing device according to a preferred embodiment of the present invention will be described while referring to the accompanying drawings wherein like parts and components are designated by the same reference numerals to avoid duplicating description.

[0040] According to a preferred embodiment of the present invention, as shown in FIG. 1, a color copier 1 (image processing device) has a main unit 1 a. The main unit 1 a is provided with a control panel 1 b on the upper front part of the main unit 1 a. A plurality of keys are provided on the control panel 1 b. A user operates the color copier 1 by depressing the plurality of keys on the control panel 1 b.

[0041] A document feed device le is provided on the top of the main unit 1 a. The document feed device le includes a document insertion aperture 1 c and a document ejection aperture 1 d. A document to be copied is inserted face-downward into the document insertion aperture 1 c. The document inserted into the document insertion aperture 1 c is fed into a reading section of the color copier 1 by the document feed device 1 e. An image (original image) on this document is read as image data by a CCD line sensor 2 (FIG. 2), which is provided inside the copier 1. The document is then ejected from the document ejection aperture 1 d.

[0042] Paper trays If are provided at the bottom of the main unit 1 a. These paper trays 1 f hold stacked sheets of recording paper, and can be pulled forward. Recording paper for printing the read image data is supplied from one of the paper trays 1 f to the interior of the main unit 1 a. The recording paper is transported according to the drive of a transport motor (LF motor) 102 (FIG. 2).

[0043] Inside the main unit 1 a, an ink-jet head 130 (FIG. 2) is provided at a location facing a printing surface of the supplied recording paper. The surface of the ink-jet head 130 that faces the recording paper is provided with an ink ejection surface that is provided with a plurality of nozzles. Inks of four colors (cyan, magenta, yellow, and black) are supplied to the ink-jet head 130 from an ink cartridge (not shown). Ink supplied to the ink-jet head 130 is ejected from the ink ejection surface of the ink-jet head 130.

[0044] The ink-jet head 130 is mounted on a carriage (not shown), which is driven by a carriage motor (CR motor) 101 (FIG. 2). The carriage is configured to move in a direction perpendicularly with respect to the direction of movement of the recording paper. The ink-jet head 130 prints read image data on the recording paper while moving in a direction perpendicular with respect to the direction of movement of the recording paper. The printed recording paper is discharged from one of recording paper discharging apertures 1 g, which are provided on one side of the color copier 1.

[0045] As shown in FIG. 2, a control device for controlling the color copier I includes a main-unit-side control board 100 and a carriage board 120 The main-unit-side control board 100 includes: a single-chip microcomputer (CPU) 91, a ROM 92, a RAM 93, a line buffer 94, an RGB data conversion circuit 95, and a gate array (G/A) 96.

[0046] The CPU 91, which is a computing device, executes control of processing, such as an original image reading processing (image read processing; FIG. 6) and print processing (not shown), in accordance with a control program stored in the ROM 92. The CPU 91 generates a printing timing signal and a reset signal, and transfers these signals to the gate array 96. The control panel 1 b is connected to the CPU 91, enabling each section of the color copier 1 to be controlled in accordance with commands inputted by the user at the control panel 1 b.

[0047] The CPU 91 is connected also to several drive circuits, including: a CR motor drive circuit 101 a for driving the CR motor 101, an LF motor drive circuit 102 a for operating the LF motor 102, and a CCD motor drive circuit 103 a for driving a CCD motor 103. When a copy command is inputted from the control panel 1 b, the CPU 91 drives the CCD motor 103 by outputting signals to the CCD motor drive circuit 103 a, thereby driving the CCD line sensor (scanner) 2 to read the original document image. Then, at a prescribed timing, the CPU 91 outputs signals to the CR motor drive circuit 101 a and the LF motor drive circuit 102 a to drive the CR motor 101 and LF motor 102 to execute printing on the recording paper. The LF motor 102 is a stepping motor, and is configured so that its rotational speed will be controlled by the number of pulses of an input pulse signal.

[0048] The CPU 91 is connected also to paper sensors 105 and origin sensors 106. The paper sensors 105 are provided at prescribed locations for detecting the front edge of recording paper and for detecting the document position (document size). The origin sensors 106 are provided at prescribed locations at which the carriage origin position and CCD line sensor 2 origin position should be detected. The CPU 91 controls operation of the respective devices connected to the CPU 91.

[0049] An analog-to-digital (A/D) conversion circuit 3 is also connected to the CPU 91. The analog-to-digital conversion circuit 3 is for converting analog data to digital data. The A/D conversion circuit 3 is connected to the CCD line sensor 2. The A/D conversion circuit 3 receives analog data, indicative of an original image, from the CCD line sensor 2 and converts the analog data into digital data The A/D conversion circuit 3 executes processings, such as sampling, quantization, and binarization, onto the input analog data, and converts this data to digital data. The resultant digital data is inputted to the CPU 91, and then is written by the CPU 91 to the RAM 93.

[0050] The CCD line sensor 2 is a device, in which a plurality of CCD elements are arranged. Each CCD element receives light that is reflected after being irradiated onto the surface of an original document, converts the received light into a charge quantity by photoelectric conversion, and then outputs the charge quantity as an analog electrical signal. In this example, the CCD line sensor 2 is a line image sensor, and performs an image reading operation on a line-by-line basis on the original image. The CCD line sensor 2 can read a color image on the original document. The CCD line sensor 2 includes: a R-line sensor unit for detecting the red (R) light component, a G-line sensor unit for detecting the green (G) light component, and a B-line sensor unit for detecting the blue (B) light component. The R-line sensor unit, the G-line sensor unit, and the B-line sensor unit are arranged with gaps of several lines between them. With this configuration, the CCD line sensor 2 produces, for each pixel of the original image, a set of RGB signals for three components of red (R), green (G) and blue (B). The RGB signal sets for all the pixels in the original image indicate the original image as a color image.

[0051] The original document and the CCD line sensor 2 are moved relative to each other to read the entire image of the original document. The original image is read one line at a time by the CCD line sensor 2, and red (R), green (G), and blue (B) color signals are outputted as indicative of red, green, and blue components of the original image.

[0052] The ROM 92 is a non-rewritable memory. The ROM 92 stores therein a control program executed by the CPU 91, and fixed values. For example, the ROM 92 stores therein an image read processing program shown in FIG. 6 as a part of the control program.

[0053] The RAM 93 is a rewritable volatile memory for temporarily storing various kinds of data. A buffer is provided in the RAM 93 for temporarily storing a plurality of sets of digital RGB data (image data) that are supplied from the A/D conversion circuit 3 and that are indicative of the original image. The RGB data sets held in this buffer is subjected to various kinds of correction by the image read processing of FIG. 6. The corrected RGB data sets are written into the line buffer 94 as values in any of 256 levels according to the respective signal strengths, with “FFR” as the maximum strength and “00H” as the minimum strength. After the RGB data sets are written to the line buffer 94, the RGB data sets are deleted from the RAM 93 buffer.

[0054] The line buffer 94 is a memory for storing the RGB data sets corrected by the image read processing of FIG. 6.

[0055] It is noted that the CCD line sensor 2 reads a large quantity of RGB data sets. Because the original image is read one line at a time by the CCD line sensor 2, it takes a long period of time to read RGB data sets for all the pixels in the original image If a series of processes for converting RGB data sets into print data sets were executed using the RAM 93 only, a too large amount of operating area will be used in the RAM 93. Considering this potential problem, the line buffer 94 is provided separately from the RAM 93 to store the RGB data sets which have been corrected by the image read processing of FIG. 6, thereby securing the capacity of the RAM 93. After the RGB data sets are stored in the line buffer 94, the RGB data sets are deleted from the RAM 93. Accordingly, the image data processing and other processing can be efficiently executed by the CPU 91 by using the RAM 93.

[0056] After the RGB data sets corrected by the image read processing of FIG. 6 are stored in the line buffer 94, the RGB data sets are then read sequentially from the line buffer 94 into the RGB data conversion circuit 95, where the RGB data sets are converted into print data.

[0057] The RGB data conversion circuit 95 is for converting the corrected RGB data sets into print data sets (C′, M′, Ye′, K1) or (K2).

[0058] As stated above, printing by the color copier 1 is carried out using an ink-jet method. With the ink-jet method, full-color image printing is performed by superimposing cyan, magenta, yellow, and black inks. Therefore, color indicated by R, G, and B data has to be reproduced by mixing the inks of cyan, magenta, yellow, and black. The circuit 95 first converts each RGB data set into a CMYe data set by using a direct map. The direct map shows the correspondence between a plurality of possible RGB data sets and a plurality of CMYe data sets. The circuit 95 then converts each CMYe data set into either a set of K data (K2) or a set of C′M′Ye′K data (C′, M′, Ye′, K1) during a black generation processing (S15: see FIG. 8) as will be described later.

[0059] The RGB data conversion circuit 95 executes an RGB data conversion processing (FIG. 7). The circuit 95 is constructed from a gate array or an ASIC. Although not shown in the drawings, the RGB data conversion circuit 95 includes several circuits including: a black generation circuit (under color removal circuit (UCR)); an image smoothing and edge enhancement circuit; a recording γ processing circuit; and a binarization circuit. The black generation circuit (UCR) is a gate array or an ASIC for performing the black generation processing (S15). The image smoothing and edge enhancement circuit is for performing a smoothing and edge enhancement processing (S12). The recording γ processing circuit is for executing a recording γ processing (S16) to correct the print characteristics of the C′M′Ye′K or K print data dependently on a y curve. The binarization circuit is for executing a binarization processing (S17) to perform halftone processing.

[0060] The gate array 96 receives a print timing signal from the CPU 91 and print data (dot-forming data or non-dot forming data) from the RGB data conversion circuit 95. The gate array 96 is for outputting a drive signal, a transfer clock, a latch signal, a parameter signal, and an ejection timing signal based on the print timing signal and the print data (dot-forming data or non-dot forming data). The drive signal is used for printing the print data on the recording paper. The transfer clock is synchronized with the drive signal. The parameter signal is used for generating a basic print waveform signal. The ejection timing signal is outputted in a fixed cycle. These signals are transferred to the carriage board 120, on which a head driver is mounted.

[0061] Although not shown in the drawing, a head driver (drive circuit) is mounted on the carriage board 120. The head driver is for driving the ink-jet head 130. The inkjet head 130 and the head driver are connected with each other by a flexible wiring sheet. The flexible wiring sheet includes a polyimide film with a thickness of 50 to 150 microns, on which a copper foil wiring pattern is formed. The head driver on the carriage board 120 is controlled via the gate array 96 on the main-unit-side control board 100, and applies each drive element in the ink jet head 130 with drive pulses of a waveform that matches a recording mode employed. As a result, a desired quantity of ink is ejected from the ink-jet head 130.

[0062] It is noted that the CPU 91, ROM 92, RAM 93, line buffer 94, RGB data conversion circuit 95, and gate array 96, are connected via a bus line 99. Signals communicated between the carriage board 120 and the gate array 96 are transferred via a harness cable connecting the carriage board 120 and the gate array 96.

[0063] In this example, the CCD line sensor 2 is oriented relative to the original document so that the CCD line sensor 2 extends parallel to the Y direction and is scanned in the X direction. The X and Y directions are perpendicular to each other. In the CCD line sensor 2, the R-line sensor unit, the G-line sensor unit, and the B-line sensor unit are arranged along the X direction with the predetermined gaps therebetween. In each of the R-, G-, and B-line sensor units, a plurality of CCD elements are arranged along the Y direction. While the CCD line sensor 2 moves in the X direction relative to the original document, the CCD line sensor 2 reads the original image one line by one line. Each CCD element generates an analog signal indicative of the amount of light of a corresponding component that the subject CCD element receives from a portion of the original image where the CCD element confronts. The analog-to-digital converter 3 receives the analog signal from each CCD element for each color, and converts the analog signal into eight-bit digital data of the corresponding component.

[0064] According to the present embodiment, a black character detection circuit 95 a is provided within the RGB data conversion circuit 95. The black character detection circuit 95 a is for preventing decrease in the definition or clearness of black characters that occurs due to the CCD line sensor 2.

[0065] It is noted that black characters have many fine-line parts and many edge parts.

[0066] The definition of the black characters normally decreases because their fine-line parts are read as a lighter color than the actual density thereof. More specifically, fine-line parts, such as one-dot fine lines, of black characters are located close to the background color that is normally not solid black. Accordingly, the one-dot fine lines are read as pixels of densities lighter than the actual densities thereof.

[0067] This problem will be described in more detail below.

[0068] It is now assumed that an original image has a black character printed on a white background. The black character has a black one-dot fine line at a position of X3 in the x direction. The black one-dot fine line extends parallel to the Y direction in a range including the positions Y1 to Y5.

[0069] When the CCD line sensor 2 moves relative to the original image to scan the positions X1 to X5, strengths of red, green, and blue components of light, which are reflected from the original image and detected by the CCD elements in the R-, G-, and B-line sensor units, change as shown in FIG. 3A along the positions X1 to X5. The strengths of red, green, and blue components of light indicate the density distribution of the original image along the positions X1-X5. The CCD elements in the R-, G-, and B-line sensor units generate analog signals, whose strengths change in the same manner as shown in FIG. 3A. It is noted that because the fine line extends at least from Y1 to Y5, the CCD elements at the respective Y1-Y5 positions generate analog signals that change in the same manner as shown in FIG. 3A.

[0070] When the analog signals shown in FIG. 3A are supplied to the analog-to-digital converter 3, the analog-to-digital converter 3 outputs: 8-bit digital values of “255h”, “224h”, “64h”, “224h”, and “255h” as red data for the X-positions X1 to X5; 8-bit digital values of “255h”, “224h”, “64h”, “224h”, and “255h” as green data for the X-positions X1 to X5; 8-bit digital values of “255h”, “224h”, “64h”, “224h”, and “255h” as blue data for the X-positions X1 to X5 as shown in FIG. 3B.

[0071] Because the black line is printed at the X-coordinate (X3) on the original image, R data, G data, and B data at X-coordinate of X3 should become equal to “00h”. As apparent from FIGS. 3A and 3B, signal strength is low at the X-coordinate (X3), and signal strength is high at coordinates (X1, X2, X4, X5) on either side of X-coordinate (X3). This properly indicates that the pixels at X-coordinate (X3) are pixels of a fine-line part.

[0072] However, as shown in FIG. 3B, the digital signal strength at X-coordinate (X3) is equal to “64h”, but is not equal to “00h”. As shown in FIG. 3A, the intensity of light reflected from the original varies even within the area of the X-coordinate (X3) position. This indicates that, due to the influence from adjacent pixels at X-coordinates of X2 and X4, the CCD line sensor 2 outputs analog signals with strength higher than “00h” at the positions on both side edges of the X-coordinate X3 position. As a result, the strength of the digital data at the X-coordinate X3 position shows a lighter density “64h” than the actual density “00h”.

[0073] Thus, pixels of fine-line parts in black characters are read as of a lighter color than its actual color, causing a decrease in the definition of the black characters. However, according to the present embodiment, the black character detection circuit 95 a detects such pixels in fine-line parts and performs black density correction onto the fine-line part in black characters. Accordingly, the definition of black characters is not decreased.

[0074] The definition of the black characters decreases also when color misalignment occurs in fine-line parts and edge parts of the black characters.

[0075] More specifically, in the CCD line sensor 2, there are gaps of several lines between the R-, G-, and B-line sensor units. Therefore, the R-, G-, and B-line sensor units read different lines on the original document simultaneously. It is necessary to use, as signals indicative of each Line on the original image, analog signals that have been outputted from the R-, G-, and B-line sensor units at different timings when the respective sensor units confront the same line on the original image.

[0076] If, however, the feeding precision of the CCD line sensor 2 is improper, the CPU 91 will erroneously use, as the signals for the same line, those analog signals that have been produced for different lines. As a result, color misalignment occurs and ink bleeding occurs.

[0077] Especially when such color bleeding occurs at the periphery of a fine line or an edge of the black character, the definition of the black characters is decreased. However, according to the present embodiment, the black character detection circuit 95 a can eliminate also such a color misalignment.

[0078] Next will be given a detailed description of the black character detection circuit 95 a.

[0079] The black character detection circuit 95 a is a circuit (gate array circuit or ASIC circuit) for performing black character detection processing (S11 shown in FIG. 9). By executing the black character detection process, the black character detection circuit 95 a detects black characters in the read image when some pixel is determined to be located within a black character, the circuit 95 a adds data of the subject pixel with a black code indicating that the subject pixel is a black character pixel.

[0080] As shown in FIG. 4, the black character detection circuit 95 a includes: a YIQ conversion circuit 95 b, a fine line detection circuit 95 c, an edge detection circuit 95 d, an achromatic area judgment circuit 95 e, and a black character determination circuit 95 f.

[0081] The YIQ conversion circuit 95 b is for performing a RGB to YIQ conversion processing (S21 and S22 in FIG. 9). By executing the RGB to YIQ conversion processing, the circuit 95 b converts a set of RGB data (R, G, B), read from the line buffer 94 for each pixel of the read image, into a set of YIQ data (Y, I, Q) that includes a brightness component (Y) and chroma components (I, Q). Brightness (Y) is data that indicates the intensity of the read pixel image. The smaller the value of Y, the greater the density, that is, the nearer the density is to black. The chroma components (I, Q) are data represented by two components: I component and Q component. The greater the absolute values of I and Q, the greater the color hue (chromaticity). In this way, the YIQ data set (Y, I, Q) indicates the degree how the original RGB data (R, G, B) is achromatic.

[0082] The YIQ conversion circuit 95 b converts an RGB data set (R, G, B) into a YIQ data set (Y, I, Q) by using the following equations (1):

Y=0.3×R+0.59×G+0.11×B

I=R−Y

Q=B−Y  (1)

[0083] It is noted that the YIQ conversion circuit 95 b receives RGB data sets (R, G, B) for all the pixels in the read image, and converts each RGB data set into a YIQ data set.

[0084] The YIQ conversion circuit 95 b outputs the resultant YIQ data sets (Y, I, Q) into each of: the fine line detection circuit 95 c, the edge detection circuit 95 d, and the achromatic area judgment circuit 95 e.

[0085] It is noted that the smoothing and edge enhancement circuit (not shown) provided in the RGB data conversion circuit 95 executes smoothing and edge enhancement processing (S12 in FIG. 7) based on the YIQ data sets. Accordingly, the YIQ conversion circuit 95 b outputs the YIQ data sets also to the smoothing and edge enhancement circuit in the RGB data conversion circuit 95.

[0086] The edge detection circuit 95 d executes edge detection processing (524 in FIG. 9) to detect edges (that is, positions where the brightness (Y) sharply changes) in the read image.

[0087] The circuit 95 d executes edge detection using only the brightness (Y) data from among the YIQ data Y, I, and Q. The circuit 95 d subjects all the pixels in the read image to the edge detection.

[0088] The edge detection circuit 95 d uses the pair of Sobel filters SF1 and SF2 shown in FIG. 5A to execute edge detection to judge whether or not each pixel in the read image is an edge pixel. Each Sobel filter SF1, SF2 is a table, which lists up weight coefficients to be multiplied to brightness (Y) data of eight adjacent pixels that are located surrounding a subject pixel (x, y) subjected to the edge detection operation. More specifically, the Sobel filter SF1 lists up weight coefficients to be multiplied to brightness (Y) data of six adjacent pixels that are located adjacent to the subject pixel (X, Y) in the X direction of the original image, while the other Sobel filter SF2 lists up weight coefficients to be multiplied to brightness (Y) data of six adjacent pixels that are located adjacent to the subject pixel (X, Y) in the Y direction of the original image. When the edge detection circuit 95 d determines that the subject pixel is an edge pixel, the circuit 95 d adds an edge code to the YIQ data set for the subject pixel. The edge code indicates that the subject pixel is an edge-part pixel.

[0089] During the edge detection operation, the circuit 95 d first sets, for the subject pixel (x, y), a 3×3 matrix area that is centered on the subject pixel (x, y). The 3×3 matrix area therefore includes: eight adjacent pixels at coordinates of (x−1, y−1), (x, y−1), (x+1, y−1), (x−1, y), (x, y), (x+1, y) (x−1, y+1), (x, y+1) and (x+1, y+1) Then, the circuit 95 d calculates the following formula (2) to determine an edge amount g(x,y) for the subject pixel (x, y) by using the brightness (Y) data at these adjacent pixels and the Sobel filters SF1 and SF2:

g(x, y)={(Δx)²+(Δy)²}^(1/2)  (2),

[0090] wherein

[0091] Δx=((−1)*Y(x−1,y−1))+((−2)*Y(x−1,y))+((−1)*Y(x−1, y+1))+((1)*Y (x+1, y−1))+((2)*Y(x+1, y))+((1)*Y(x+1, y+1)), and

Δy=((−1)*Y(x−1,y−1))+((−2)*Y(x, y−1))+((−1)*Y(x+1, y−1))+((1)*Y(x−1, y+1))+((2)*Y(x,y+1))+((1)*Y(x+1, y+1)).

[0092] Then, the circuit 95 d compares the value of g(x,y) with a predetermined threshold value when the value of g(x, y) is greater than the threshold value, the circuit 95 d determines that the pixel (x, y) is a part of an edge. When the value of g(x, y) is equal to or smaller than the threshold value, the circuit 95 d determines that the pixel (x, y) is not a part of an edge. When the pixel (x, y) is determined as a part of an edge, the circuit 95 d adds an edge code to the YIQ data set for the pixel (x, y).

[0093] For example, Y data for pixels (X1, Y1) to (X3, Y3) are as shown in FIG. 5B in the read image. In this case, in order to judge whether or not the pixel (X2, Y2), centered on the 3×3 matrix, is in an edge part, the circuit 95 d calculates an edge amount g(X2, Y2) as indicated below:

g(X2, Y2)={(ΔX2)²+(ΔY2)²}^(1/2)

[0094] wherein

[0095] ΔX2=((−1)*100)+((−2)*120)+((−1)*130)+((1)*170)+((2)*180)+((1)*190), and

[0096] ΔY2=((−1)*100)+((−2)*140)+((−1)*170)+((1)*130)+((2)*160)+((1)*190)

[0097] It is noted that the edge detection circuit 95 d may not detect a one-dot fine line as an edge. That is, even if some pixel (x, y) is in a one-dot fine line, the edge amount g(x,y) will be calculated as being equal to “0” and therefore the circuit 95 d will determine that the pixel (x, y) is not a part of an edge part.

[0098] The fine line detection circuit 95 c is for executing fine line detection processing (S23 in FIG. 9) to detect fine line parts in the read image.

[0099] According to the present embodiment, the fine line detection circuit 95 c is configured so as to be capable of detecting a one-dot fine line that is difficult to detect by the edge detection circuit 95 d. The fine line detection circuit 95 c executes fine line detection using only the brightness (Y) data from among the YIQ data Y, I, and Q.

[0100] The fine line detection circuit 95 c subjects all the pixels in the read image to the fine line detection.

[0101] When one pixel (fine-line pixel (X3, Y3) in FIG. 13) is subjected to the fine-line detection as a subject pixel 17, the circuit 95 c performs fine-line detection as described below.

[0102] First, the circuit 95 c sets up a 3×3 matrix area, centered on the subject pixel 17, as a subject pixel area 18 as shown in FIG. 13. The thus set 3×3 matrix area 18 is composed of a total of nine pixels, in three rows and three columns.

[0103] Then, the circuit 95 c assigns a point value in a range of 0 to 8 to each pixel in the 3×3 matrix area 18. A median point value “4” is assigned to the subject pixel 17. The minimum point value of each row is assigned to the pixel that is located at the left end of the corresponding row and that has the smallest coordinate value in the corresponding row. Point values are assigned so as to increase in the amounts from the top row to the bottom row. By setting the point values in this way, it is ensured that the sum of the point values of any three pixels that include the subject pixel and that are aligned vertically, horizontally, or diagonally in the 3×3 matrix area, is equal to “12”.

[0104] Then, the circuit 95 c extracts three pixels 22 in order from the 3×3 matrix area 18. That is, the circuit 95 c first extracts the pixel with the smallest brightness (Y) value, then extracts the pixel with the second smallest brightness (Y) value, and then extracts the pixel with the third smallest brightness (Y) value.

[0105] The circuit 95 c calculates the total amount of the point values of the three extracted pixels 22. If the total amount is equal to “12”, this indicates that the three extracted pixels 22 include the subject pixel 17 in their center location and the subject pixel 17 and the remaining two pixels are aligned vertically, horizontally, or diagonally. Thus, it is known that the three pixels 22 are connected because the three pixels are aligned vertically, horizontally, or diagonally.

[0106] It is noted that if the subject pixel 17 is a pixel of a fine-line part, the above-described three pixels including the subject pixel 17 are in a connected state. However, pixels in a connected state are not necessarily fine-line part pixels, but are often pixels indicative of a halftone image. Therefore, in order to detect only fine-line part pixels, the circuit 95 c next performs an operation to verify to what degree there is a significant difference between the density of the three extracted pixels 22 and that of the non-extracted pixels in a manner described below.

[0107] The circuit 95 c executes this verification by first calculating an intermediate value between the minimum and maximum brightness (Y) values of the pixels in the 3×3 matrix area 18. Then, the circuit 95 c counts the number of pixels 23 whose brightness is smaller than the intermediate value. If the number of the darker pixels 23 is three or less, the circuit 95 c determines that the subject pixel 17 is a fine-line part pixel. On the other hand, if the number of the darker pixels 23 is four or more, the circuit 95 c determines that the subject pixel 17 is not a fine-line part pixel.

[0108] When the circuit 95 c determines that the subject pixel 17 is a fine-line part pixel, the circuit 95 c adds a fine-line code to the YIQ data set of the subject pixel 17. The fine-line code indicates that the subject pixel 17 is a fine-line part pixel. In this way, the circuit 95 c can detect a one-dot fine-line that cannot be detected by the edge detection circuit 95 d.

[0109] It is noted that characters are often composed of fine lines and have many edges. Therefore, according to the present embodiment, pixels detected as fine-line pixels by the fine line detection circuit 95 c and pixels detected as edge pixels by the edge detection circuit 95 d are determined as character-area pixels that are located in a part of some character even though the pixels are not actually any parts of characters, that is, even though the pixels are simple fine lines or edges that do not constitute any characters.

[0110] The achromatic area judgment circuit 95 e is for executing achromatic area judgment processing (S27 through S30 in FIG. 9). By executing the achromatic area judgment processing, the achromatic area judgment circuit 95 e judges whether or not each character-area pixel is achromatic based on YIQ data.

[0111] As described above, according to the present embodiment, if some pixel is detected as being in an edge part or a fine-line part, even if the pixel is actually not in any character part, the pixel is determined as a character-area pixel. The achromatic area judgment circuit 95 e therefore executes the achromatic area judgment operation onto the character-area pixels regardless of whether the character-area pixels are actually in some character part or not. It is noted that image definition will decrease when color bleeding occurs in an achromatic fine-line part or edge part, as well as when color bleeding occurs in achromatic characters. By executing the achromatic area judgment operation not only to characters but also to other fine-line parts or edge parts, it is possible to improve the entire image definition.

[0112] More specifically, the achromatic area judgment circuit 95 e subjects all the character-area pixels (all the fine-line pixels and all the edge pixels) in the read image to the achromatic area judgment. When one pixel (edge pixel (X3, Y3) in FIG. 10, or fine-line pixel (X3, Y3) in FIG. 11) is subjected to the achromatic area judgment as a subject pixel 17, the circuit 95 e performs achromatic area judgment as described below.

[0113] First, the achromatic area judgment circuit 95 e sets up a 3×3 subject area 18 that is centered on the subject pixel 17. The circuit 95 e extracts, as a judgment pixel 19, a pixel with the lowest brightness in the 3×3 subject area 18. The circuit 95 e then sets up a 3×3 judgment area 20 that is centered on the judgment pixel 19,

[0114] Then, the circuit 95 e determines that the subject pixel 17 is achromatic if the absolute value of the average of the chroma component I in the judgment area 20 is less than a first predetermined threshold T1 and the absolute value of the average of the chroma component Q in the judgment area 20 is less than a second predetermined threshold T2. It is noted that each of the first and second thresholds T1 and T2 is such a value as 15 or 16, for example.

[0115] The circuit 95 e determines that the subject pixel 17 is chromatic if the absolute value of the average of the chroma component I in the judgment area 20 is greater than or equal to the threshold T1 or the absolute value of the average of the chroma component Q in the judgment area 20 is greater than or equal to the threshold T2.

[0116] It is noted that when the subject pixel 17 is determined as achromatic by the circuit 95 e, it is known that the subject pixel 17 has no chroma and therefore the color of the subject pixel 17 is located on an achromatic axis that extends from black through gray to white.

[0117] The black character determination circuit 95 f is for performing a black character determination (S31 in FIG. 9). More specifically, when some pixel, which has been judged as a character-area pixel according to the judgment results of the fine line detection circuit 95 c or the edge detection circuit 95 d, is judged to be achromatic by the achromatic area judgment circuit 95 e, the black character determination circuit 95 f determines that the character-area pixel is a black-character pixel that constitutes a part of a black character.

[0118] It is noted that when the character-area pixel is judged as being achromatic by the circuit 95 e, the pixel may be either black, gray, or white. However, the black character determination circuit 95 f automatically determines the achromatic character-area pixels as black-character pixels regardless of whether the achromatic character-area pixels are black, gray, or white.

[0119] In this way, the black character detection circuit 95 a determines, as black-character pixels, not only those pixels that actually constitute part of black characters but also other pixels including: pixels constituting part of gray or white characters, pixels constituting black, gray, or white fine-lines other than parts of characters, and pixels constituting black, gray, or white edges other than parts of characters.

[0120] The black character determination circuit 95 f then adds a black code to the YIQ data set for the black-character pixel. The black code indicates that the subject pixel is a black-character pixel and therefore that the subject pixel should be printed with black ink only.

[0121] For example, if one set of YIQ data, to which a fine-line code has been added by the fine line detection circuit 95 c, is judged to be achromatic by the operation of the achromatic area judgment circuit 95 e, a black code is added to the YIQ data set by the black character determination circuit 95 f.

[0122] It is noted that for a pixel having the YIQ data with a black code, the black generation circuit in the circuit 95 will generate, in S15 in FIG. 8, K data that specifies printing in black monochrome ink only. Accordingly, it is ensured that black character pixels are printed in black.

[0123] Even if the CCD line sensor 2 reads black fine-line pixels as pixels of lighter densities than the original black densities, the black fine-line part pixels will be printed as completely black, and the contrast of the fine-line images can be improved. Even if color misalignment occurs by the CCD line sensor 2 in black edge parts or black fine-line parts, it is still possible to prevent color bleeding from occurring in resultant print images, and to output well-defined black images. Gray and white characters, black, gray, and white fine lines, and black, gray, and white edges will also be printed by black ink only, and therefore will be reproduced accurately at a proper, not lighter density, and without suffering from any color bleeding.

[0124] With the above-described configuration, the color copier 1 of the present embodiment operates as described below.

[0125] When the CCD line sensor 2 reads an original image and outputs analog signals for red, green, and blue components for each pixel, the analog signals are converted by the A/D converter 3 into a set of digital RGB data (R, G, B) for the subject pixel. The resultant RGB data set (R, G, B) is temporarily stored in the RAM 93. On the main-unit-side control board 100, the RGB data set for each pixel is read from the RAM 93, and is subjected to an image reading process of FIG. 6.

[0126] During the image reading processing, the RGB data set for each pixel is corrected as described below.

[0127] A black correction (dark correction) is first executed in S1. Accordingly, the black level of the R, G, and B data is corrected.

[0128] Next, in S2, shading correction processing is executed onto the RGB data set for each pixel, Then, in S3, a read y processing is executed onto the RGB data set for each pixel to compensate for the γ characteristics of the CCD line sensor 2.

[0129] In this way, the RGB data (R, G, B) is corrected based on the characteristics of the reading optical system. The RGB data (R, G, B) that has undergone by processings S1 through S3 is then written to the line buffer 94 in S4, and the image read processing ends.

[0130] The RGB data conversion circuit 95 executes RGB data conversion processing of rig. 7 onto a RGB data set for each pixel, that is now stored in the line buffer 94, and converts the RGB data set (R, G, B) into a set of C′M′Ye′K print data or a set of K print data.

[0131] During the RGB data conversion processing, first, in S11, the black character detection circuit 95 a retrieves RGB data sets (R, G, B) for all the pixels from the line buffer 94, and executes a black character detection processing onto the RGB data sets. The black character detection circuit 95 a judges whether or not each pixel in the image is a black character pixel, thereby extracting black-character pixels from the image, and adds black codes to the black-character pixels.

[0132] More specifically, as shown in FIG. 9, first, the YIQ conversion circuit 95 b executes a YIQ conversion processing (S21 and S22) to convert RGB data (R, G, B) for all the pixels into YIQ data (Y, I, Q).

[0133] Next, the fine line detection circuit 95 c executes a fine line detection processing (S23) to judge whether or not each pixel in the image is a fine-line pixel. The circuit 95 c adds a fine-line code to a YIQ data set for each pixel that is judged as being a fine-line pixel.

[0134] It is noted that although the YIQ data set (Y, I, Q) is composed of three kinds of data Y, I, and Q, the YIQ data set (Y, I, Q) functions as one set of pixel data including these three kinds of data. Therefore, a single fine-line code is added to the set of YIQ data for one pixel.

[0135] Then, the edge detection circuit 95 d executes an edge detection processing (S24) to judge whether or not each pixel in the image is an edge pixel. The circuit 95 d adds an edge code to a YIQ data set for each pixel that is judged as being an edge pixel.

[0136] Next, in S25, the fine-line pixels and the edge pixels are determined as character-area pixels that constitute a part of some character, even if those pixels are not in part of any characters actually.

[0137] Next, in S26 to S32, the achromatic area judgment circuit 95 e and the black character determination circuit 95 f are operated to extract black-character pixels among the character-area pixels, and to add black codes to the black-character pixels.

[0138] More specifically, the circuit 95 e executes an achromatic area detection processing (S26 through S30) to judge whether or not each character-area pixel (each fine-line pixel and each edge pixel) is achromatic. When a character-area pixel is determined as achromatic, it is known that the character-pixel is a black-character pixel that constitutes a part of a black character. Accordingly, the black character determination circuit 95 f executes a black character determination processing (S31) to add a black code to the YIQ data for such a black-character pixel.

[0139] It is noted that when the black code is added to the YIQ data for each black-character pixel in S11, this black code will not be cleared, but will remain being added to data for the subject pixel even when YIQ data is converted into RGB data in S13 (FIG. 7), and further converted into CMYe print data in S14 to be described later. It is therefore assured that K data for designating print in black monochromatic ink will be generated for those black-character pixels during the black generation processing (S15) to be described later.

[0140] After black-character pixels are determined among all the pixels in the image and are added with black codes in S11, the process proceeds to S12, in which smoothing and edge enhancement processing is executed. In S12, the YIQ data for all the pixels in the image is subjected to a smoothing process and an edge enhancement process.

[0141] Next, in S13, a YIQ-RGB conversion processing is executed to convert YIQ data sets for all the pixels, which have been processed in S12, back into RGB data sets.

[0142] In S14, a color conversion processing is executed to convert a set of RGB data obtained in S13 for each pixel into a set of CMYe data by using the direct map. The “direct map” is a table showing the correspondence between a plurality of RGB data sets (R, G, B), which are defined on the reading-device color system, and a plurality of CMYe data sets (C, M, Ye), which are defined on the printing-device color system.

[0143] Next, in S15, black generation processing is executed. During the black generation processing, a set of chromatic print data (C′, M′, Ye′, K1) or a set of achromatic print data (K2) is generated based on the CMYe data (C, M, Ye), which has been obtained in S14 for each pixel. That is, if a set of CMYe data (C, M, Ye) for one pixel is being added with no black code, the CMYe data set is replaced by a set of C′M′Ye′K data (C′, M′, Ye′, K1) If a set of CMYe data for one pixel is being added with a black code, the CMYe data set is replaced by a set of K data (K2).

[0144] The set of chromatic print data (C′, M′, Ye′, K1) specifies the ejection quantities of cyan (C′), magenta (M′), yellow (Ye′), and black (K1) to generate chromatic color. The set of achromatic print data (K2) specifies the ejection quantity of black (K2) to generate achromatic color by the black monochromatic ink, only.

[0145] In 516, recording γ processing is executed onto the C′M′Ye′K data (C′, M′, Ye′, K1) or K data (K2), which has been obtained in S15 for each pixel, in order to perform I correction of color characteristics of the respective inks of cyan (C′), magenta (M′), yellow (Ye′), and black (K1) or K2). Thus, C′M′Ye′K data (C′, M′, Ye′, K1) or K data (K2) for each pixel is corrected based on the print color characteristics.

[0146] Next, in S17, a binarization processing is executed onto the C′M′Ye′K data (C′, M′, Ye′, K1) or K data (K2) for each pixel. The binarization processing employs a halftone processing by using an error diffusion method or a dithering method. During the binarization processing, each data C′, M′, Ye′, K1 constituting the C′M′Ye′K data set (C′, M′, Ye′, K1) or data K2 constituting the K data set (K2) is compared with a predetermined threshold, and is converted into dot-forming data or non-dot forming data according to the comparison result. The dot-forming data indicates that the corresponding color ink should be ejected to form a corresponding color dot, while the non-dot forming data indicates that the corresponding color ink should not be ejected to form no dot.

[0147] Next, in S18, the dot-forming data or non-dot forming data (binarized C′M′Ye′K data (C′, M′, Ye′, K1) or binarized K data (K2)) for each pixel is transmitted to the gate array 96. Then, this RGB data conversion processing ends.

[0148] Next, the black generation processing (S15) will be described in greater detail with reference to FIG. 8.

[0149] The black generation processing (S15) is executed by the black generation circuit (UCR) provided in the RGB data conversion circuit 95.

[0150] During the black generation processing (S15), the flow of processes shown in FIG. 8 is executed repeatedly for all the pixels in the image.

[0151] For each pixel, it is first judged in S41 whether or not a set of CMYe print data for the subject pixel is being added with a black code. If CMYe data for that pixel is being added with a black code (S41: Yes), the process proceeds to S42, in which the CMYe data for the subject pixel is replaced by a set of K print data (K2) indicative of printing in black ink monochrome only.

[0152] On the other hand, if the CMYe print data for the subject pixel is being added with no black code (S41: No), the program proceeds to S43, wherein a set of C′M′Ye′K print data (C′, M′, Ye′, K1) is generated for the subject pixel based on the original CMYe print data. More specifically, K data (K1) is first generated based on the C, M, and Ye data in the original CMYe print data. Then, C′ data, M′ data, and Ye′ data are generated by subtracting the value of K data (K1) (black component) from the values of the original C, M, and Ye data, respectively. Then, the original set of CMYe data (C, M, Ye) is replaced by the newly-generated set of C′M′Ye′K data (C′, M′, Ye′, K1).

[0153] It is noted that in S43, K data (K1) is generated based on CMYe data in the same manner as K data (K2) is generated based on CMYe data in S42. However, K data (K1) may be generated based on CMYe data in a manner different from the manner that K data (K2) is generated based on CMYe data in S42.

[0154] When CMYe data sets (C, M, Ye) for all the pixels are converted into C′M′Ye′K data (C′, M′, Ye′, K1) Or K data (K2), the process of S15 ends, and the process proceeds to S16 (FIG. 7).

[0155] Next, the black character detection processing (S11) will be described in greater detail while referring to the flowchart in FIG. 9.

[0156] It is noted that the black character detection processing (S11) is executed by the black character detection circuit 95 a.

[0157] During the black character detection processing of S11, first, in S21, a RGB data set (R, G, B) for each of all the pixels (x, y) in the read image is read out from the line buffer 94.

[0158] Next, in S22, a set of RGB data (R, G, B) for each pixel is converted into a set of YIQ data (Y, I, Q) by the YIQ conversion circuit 95 b by using the equation (1).

[0159] Next, in S23, a fine line detection processing is executed by the fine line detection circuit 95 c to detect whether or not each pixel in the read image is a fine-line pixel. A fine-line code is added to a pixel that is judged as being a fine-line pixel.

[0160] Next, in S24, an edge detection processing is executed by the edge detection circuit 95 d to detect whether or not each pixel in the read image is in an edge pixel. An edge code is added to a pixel that is judged as being an edge pixel.

[0161] Next, in S25, fine-line pixels determined in S23, and edge pixels determined in S24 are determined as character-area pixels, and a character area is defined as an area that is made up of the character-area pixels. As a result, the character area is determined in the read image.

[0162] It is now assumed that the line buffer 94 stores therein 25 sets of RGB data (R, G, B) for pixels (X1, Y1) to (X5, Y5) in the read image. It is also assumed that R data, G data, and B data in the 25 RGB data sets have values as shown in FIG. 10. In this case, YIQ data sets are obtained for those pixels (X1, Y1) to (X5, Y5) in S22 as also shown in FIG. 10. It is also assumed that the pixel at coordinates (X3, Y3) has been determined as an edge pixel in S24 and therefore is determined in S25 as being a character-area pixel that is located within the character area.

[0163] Next, in S26, character-area pixels in the character area are selected. More specifically, the circuit 95 e detects whether or not each pixel is being added with a fine-line code or an edge code. When the pixel is being added with a fine-line code or an edge code, it is known that the subject pixel is a character-area pixel (a fine-line pixel or an edge pixels). In this way, the circuit 95 e identifies character-area pixels in the image. Then, among the character-area pixels, one character-area pixel, which has not yet been subjected to a black character judging operation, is determined as a pixel 17 to be subjected to the black character judging operation.

[0164] It is now assumed that the character-area pixel at coordinates (X3, Y3) is now set as the subject pixel 17 as shown in FIG. 10.

[0165] Next, in S27, a 3×3 matrix area, centered on the subject pixel 17, is set as a subject area 18. In this example, a 3×3 matrix area, which is centered on the subject pixel 17, is set up as the subject area 18 as shown in FIG. 10. Also in S27, a pixel with the lowest brightness value within the subject area 18 is set as a judgment pixel 19.

[0166] It is noted that if there are more than one pixels having the lowest brightness value within the subject area 18, any one of these pixels may be selected. For example, one pixel that has been obtained first among the more than one pixel during the scanning operation or that has the lowest coordinates among the more than one pixel may be selected. In this example of FIG. 10, pixels at three coordinates of (X4, Y2), (X4, Y3), and (X4, Y5) have the same lowest value “0”. In this example, the pixel at the lowest coordinates (X4, Y2) that has the lowest coordinates is selected. It is noted, however, that another selection method may be employed. In this example, as shown in FIG. 10, the lowest-brightness pixel (X4, Y2) is set as the judgment pixel 19 in the 3×3-matrix subject area 18.

[0167] Next, in S28, another 3×3 matrix area, centered on the judgment pixel 19 (X4, Y2), is determined as an area of judgment 20. Also in S28, the average of the chroma components I at all the pixels in the judgment area 20 is calculated. The average of the chroma components Q at all the pixels in the judgment area 20 are also calculated.

[0168] Next, in S29, it is determined whether or not an absolute value of the calculated chroma component (I) average is less than the first predetermined threshold T1.

[0169] If the absolute value of the chroma component (I) average is less than the first threshold T1 (S29: Yes), it is further determined in S30 whether or not an absolute value of the calculated chroma component (Q) average is less than the second predetermined threshold T2.

[0170] If the absolute value of the chroma component (Q) average is less than the second threshold T2 (S30: Yes), the process proceeds to S31, in which the subject pixel 17 is determined to be an achromatic pixel. Addition of a black code to the YIQ data set (Y, I, Q) for the subject pixel 17 is specified.

[0171] In this way, the threshold T1 is set for the chroma component (I), and the second threshold T2 is set for the chroma component (Q). If the absolute value of the calculated average of chroma component (I) is smaller than the threshold T1 and the absolute value of the calculated average of chroma component (Q) is smaller than the threshold T2, the subject pixel 17 is determined as being an achromatic pixel.

[0172] In this example of FIG. 10, the average values 21 of chroma components I and Q for the judgment pixel 19 are “−4” and “14”, respectively. If the absolute value “4” of the chroma component (I) average value 21 is smaller than the first threshold T1 and the absolute value “14” of the chroma component (Q) average value 21 is smaller than the second threshold T2, the subject pixel 17 is determined as being an achromatic pixel.

[0173] Next, in S32, it is determined whether or not the processes of S26-S31 have been completed for all the character-area pixels. If the processes of S26-S32 have been completed for all the character-area pixels (S32: Yes), the black character judgment process (S11) ends.

[0174] On the other hand, if the processes of S26-S31 have not yet been completed for all the pixels in the character area (S32: No), the processing flow returns to S26, and processes of S26 through S32 are executed repeatedly until judgment has been completed for all the character-area pixels.

[0175] It is noted that if a plurality of character areas are formed separately from one another in the single image, the processes of S26-S32 are executed sequentially for the respective character areas. Processing ends when the processes of S26-S32 have been completed for all the character-area pixels in all the character areas.

[0176] If it is determined that the absolute value of the chroma component (I) average is greater than or equal to the first threshold T1 (S29: No), the processing flow proceeds directly to S32. Similarly, if it is determined that the absolute value of the chroma component (Q) average is greater than or equal to the second threshold (S30: No), the processing flow proceeds directly to S32.

[0177] The above description is given for the example where the processes of S26-S32 are executed for the edge pixel 17 shown in FIG. 10. However, the processes of S26-S32 may be executed in the same manner as described above for fine-line pixels.

[0178] More specifically, it is now assumed that R, G, and B data in the RGB data sets for 25 pixels (X1, Y1) to (X5, Y5) in the read image are as shown in FIG. 11. In this case, Y data, I data, and Q data in the YIQ data sets are obtained in S22 for those pixels (X1, Y1) to (X5, Y5) as also shown in FIG. 11.

[0179] It is also assumed that the pixel at coordinates (X3, Y3) is determined as a fine-line pixel in S23 and therefore is determined as being a character-area pixel in S25. It is also assumed that the pixel at coordinates (X3, Y3) is set as the subject pixel 17 in S26.

[0180] In this case, in S27, a 3×3 matrix pixel area 18 centered on the subject pixel 17 is selected as the subject area 18, and pixel (X3, Y2) with the lowest brightness in is this pixel area 18 is set as the judgment pixel 19. Because three pixels (X3, Y2), (X3, Y3), and (X3, Y4) have the same lowest brightness value, the pixel (X3, Y2) with the lowest coordinates is selected as the judgment pixel 19.

[0181] Next, in S28, a 3×3 matrix pixel area 20 centered on the pixel of judgment 29 is determined as the judgment area 20. Average values of chroma components I and Q are then calculated in the judgment area 20.

[0182] It is judged in S29 and S30 whether or not the subject pixel 17 is achromatic according to whether or not the absolute values of the averages 21 are smaller than the first and second thresholds T1, T2.

[0183] It is noted that the averages 21 of the chroma components in the judgment area 20 are considered as the averages 21 of the chroma components at the judgment pixel 19. It can therefore be said that it is judged whether or not the subject pixel 17 is achromatic by detecting the average values of chroma components at the judgment pixel 19 that has the lowest brightness among the pixels around the subject pixel 17. Thus, even if color misalignment occurs around the subject pixel 17 in the RGB data in FIG. 10 or 11, the judgment point can be shifted from the subject pixel 17 to the judgment pixel 19 that has the lowest brightness and therefore that has the highest degree of color superimposition. In other words, the judgment pixel 19 is the pixel least affected by color misalignment and therefore represents the original document color with the highest reliability. Because judgment is executed at the judgment pixel 19, the effect of color misalignment can be reduced effectively. Consequently, by using this method to carry out the achromatic judgment for the subject pixel 17, it is possible to execute color misalignment correction onto the subject pixel 17 and improve the definition or clearness of a resultant output image. In this way, color misalignment occurring in black characters due to the reading device can be eliminated, and a well-defined image that is free from color bleeding can be obtained in a resultant print image.

[0184] As described above, in the black character detection processing of the present embodiment, RGB data read from the line buffer 94 is converted into YIQ data. For a subject pixel 17 (X3, Y3), a subject area 18 centered on the subject pixel 17 is set, and a judgment pixel 19 that has the lowest brightness in the subject area 18 is set. Then, a judgment area 20 is set as being centered on the judgment pixel 19. If the absolute values of the averages 21 of chroma components I and Q in the judgment area 20 are both less than the corresponding thresholds T1 and T2, the subject pixel 17 is determined as being an achromatic pixel.

[0185] Black codes are added to fine-line pixels and edge pixels (character-area pixels) if the fine-line pixels and edge pixels are determined as being achromatic. Thus, the fine-line pixels and edge pixels can be specified as to be printed in black monochromatic ink. Therefore, black character or similar fine-line or edge part images can be outputted with high quality.

[0186] Next, the edge detection processing of S24 will be described.

[0187] The edge detection processing is executed by the edge detection circuit 95 b.

[0188] During the edge detection processing, detection is carried out using the brightness (Y) value of each of all the pixels in the read image. Therefore, Y data is first extracted from the YIQ data sets (Y, I, Q) for all the pixels (x, y), which have been obtained in S22.

[0189] Then, for each pixel (x, y), a 3×3 matrix area centered on the subject pixel is determined, and the edge amount g(x,y) is calculated for the subject pixel (x,y) by using the formula (2) and by using the Sobel filters SF1 an SF2. Then, the calculated edge amount g(x,y) is compared with the threshold. When the edge amount g(x,y) is greater than the threshold, the pixel (x, y) is determined as an edge pixel, and an edge code is added to the YIQ data set for the subject pixel (x, y). On the other hand, when the calculated edge amount g(x,y) is smaller than or equal to the threshold, the pixel (x, y) is not determined as an edge pixel.

[0190] The above-described detection is executed for all the pixels (x, y) in the read image.

[0191] Next, the fine line detection processing of S23 will be described with reference to the flowchart in FIG. 12.

[0192] The fine line detection processing is executed by the fine line detection circuit 95 c.

[0193] During the fine line detection processing, detection is carried out using the brightness (Y) value of each of all the pixels in the read image. Therefore, Y data is first extracted in S120 from the YIQ data sets (Y, I, Q) for all the pixels (x, y), which have been obtained in S22.

[0194] It is now assumed that R, G, and B data in RGB data sets for pixels (X1, Y1) to (X5, Y5) in the read image are as shown in FIG. 13. In this case, Y data indicating brightness (Y) values for those pixels (X1, Y1) to (X5, Y5) are obtained as also shown in FIG. 13.

[0195] Next, in S121, pixels which have not yet been subjected to the fine-line detection of S23 are determined as not-yet-judged pixels, and one pixel that has the lowest coordinate value among the not-yet-judged pixels is selected as a subject pixel. It is now assumed that the pixel at coordinates (X3, Y3) is set as the subject pixel 17 as shown in FIG. 13.

[0196] Next, in S122, a 3×3 matrix area, centered on the subject pixel 17, is determined as a subject area 18.

[0197] In this case, the 3×3 matrix area, which is centered on the subject pixel 17, is set up as the subject area 18.

[0198] Next, in S123, point values “0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, and “8” are assigned to the matrix-element pixels constituting the 3×3-matrix subject area 18. As shown in FIG. 13, the point values are assigned so that the top-left matrix-element pixel with coordinates (X2, Y2) has a value of “0”, the matrix element with coordinates (X3, Y2) has a value of “1”, the matrix element with coordinates (X4, Y2) has a value of “2”, the matrix-element pixel with coordinates (X2, Y3) has a value of “3”, the subject pixel 17 with coordinates (X3, Y3) has the median value “4”, the matrix-element pixel with coordinates (X4, Y3) has a value of “5”, the bottom-left matrix-element pixel with coordinates (X2, Y4) has a value of “6”, the matrix element with coordinates (X3, Y4) has a value of “7”, and the bottom-right matrix element with coordinates (X4, Y4) has a value of “8”.

[0199] Then, in S124, among the pixels in the matrix area 18, one pixel 22 with the lowest brightness value Y, another pixel 22 with the second lowest brightness value Y, and another pixel 22 with the third lowest brightness value Y are extracted in this order. The point values of the three extracted pixels 22 are summed up together.

[0200] In this example of FIG. 13, three pixels 22 at coordinates (X3, Y2), coordinates (X3, Y3), and coordinates (X3, Y4) are extracted from the subject area 18. The total value of the point values of “1”, “4”, and “7” for those three pixels 22 is calculated.

[0201] Next, in S125, it is determined whether or not the total point value of the three extracted pixels 22 is equal to “12”. If the total point value is equal to “12” (S125: Yes), it is known that the three extracted pixels 22 are in a connected state because the total point value is equal to 12. Then, the process proceeds to S126.

[0202] In S126, an intermediate value between the maximum Y value and the minimum Y value in the matrix area 18 is calculated.

[0203] In the example of FIG. 13, matrix elements 22 with point values “1”, “4”, and “7” are extracted in S124. Because the total of these point values is “12” (yes in S125), the extracted pixels are determined to be in a connected state. Then, in S126, the sum of the minimum brightness (Y) value “90” in the subject area 18 and the maximum brightness (Y) value “223” in the subject area 18 is divided by two, giving an intermediate value of “157”.

[0204] Next, in S127, pixels in the subject area 18 that have a brightness value (Y) lower than the intermediate value are detected, and the number of these pixels is counted. In this example, as shown in FIG. 13, three pixels 23 at coordinates (X3, Y2), coordinates (X3, Y3), and coordinates (X3, Y4) are detected as having brightness (Y) values lower than the intermediate value “157”.

[0205] It is then determined in S128 whether or not the counted number of the detected pixels is less than four. If the number of the detected pixels is less than four (S128: Yes), it is known that there is a significant difference between the density of the extracted pixels 22 in the subject area 18 and the density of the non-extracted pixels in the subject area 18. Accordingly, the process proceeds to S129, in which the subject pixel 17 is determined as a fine-line pixel, and addition of a fine-line code to the YIQ data set (Y, I, Q) for the subject pixel 17 is specified.

[0206] As shown in FIG. 13, because the number of pixels 23 detected in S127 is three and is less than four (yes in S128), the subject pixel 17 (X3, Y3) is determined as a fine-line pixel, and a fine-line code is added to the subject pixel 17 (X3, Y3).

[0207] Next, in S130, it is determined whether or not the fine line judgment has been completed for all the pixels within the read image. If judgment has been completed for all the pixels (S130: Yes), this fine line detection processing ends.

[0208] On the other hand, if it is determined in S130 that judgment has not yet been completed for all the pixels (S130: No), the processing flow returns to S121, and S121 through S130 is executed repeatedly until judgment has been completed for all the pixels in the image.

[0209] If it is determined in S125 that the total point value of the three pixels 22 extracted in S124 is different from “12” (S125: No), it is determined that the subject pixel 17 is not in a connected state. Accordingly, the processing flow proceeds directly to S130.

[0210] If it is determined in S128 that the counted number of the pixels 23 detected in S127 is four or more (S128: No), it is determined that the subject pixel 17 is not a fine-line pixel because there is no significant difference between the density of the extracted pixels 22 and the density of the non-extracted pixels. Accordingly, the processing flow proceeds directly to S130.

[0211] As described above, according to the fine line detection processing of S23, when one pixel to be subjected to the fine line detection processing is determined as a subject pixel 17; a 3×3 matrix area centered on this subject pixel 17 is set as a subject area 18. Point values “0” to “8” are assigned to the matrix elements constituting this 3×3 matrix subject area 18. Then, three pixels 22 with the first, second, and third lowest brightness values are extracted from the subject area 18. When the total point value of the three extracted pixels 22 is equal to “12”, the extracted pixels 22 are determined as being in a connected state. Then, an intermediate value “157” is calculated from the minimum and maximum values of brightness (Y) of pixels in the subject area 18. When the number of pixels with a brightness (Y) value smaller than the intermediate value is less than 4, the subject pixel 17 is determined as being a fine-line pixel. A fine-line code is added to the subject pixel 17 that is determined as being a fine-line pixel.

[0212] In this way, during the fine line detection processing of S23, even a one-dot fine line, which is difficult to detect during the edge part detection of S24, can be detected with certitude. Accordingly, fine-line image data that is read as a lighter color due to the influence of the peripheral image part or other colors in the original document, can be corrected appropriately. It is possible to improve the contrast of black characters composed of black fine lines, and to obtain a high-quality print image, without adversely affecting other image parts.

[0213] <First Modification of Black Character Judgment>

[0214] It is noted that according to the processes of S26 through S31, the subject pixel 11 is determined as achromatic when the judgment area 20 has relatively small chroma component averages, that is, when the color of the judgment area 20 is located substantially on an achromatic axis (gray axis) that extends from white through gray to black. Accordingly, in S31, the black code is added not only to black pixels but also to gray and white pixels.

[0215] If it is desired to add a black code to black pixels only, the process of S11 may be modified by adding an additional judging process of S33 between S30 and S31 as shown in FIG. 14.

[0216] During the additional judging step of S33, it is judged whether or not the brightness Y of the judgment pixel 19 is less than a prescribed threshold T3. The threshold T3 is a very small value, such as “02h”, for example, that is sufficiently close to “00h”.

[0217] In this modification, even when the judgment of S30 is affirmative, the process will not proceed to S31 directly, but can proceed to S31 only when the brightness Y of the judgment pixel 19 is less than the prescribed threshold T3. Accordingly, when the judgment pixel 19 is substantially black, the process proceeds to S31, wherein the subject pixel 17 is added with a black code. On the other hand, when the brightness Y of the judgment pixel 19 is greater than or equal to the prescribed threshold T3, the process proceeds to S32. Accordingly, the subject pixel 17 is not added with a black code.

[0218] It is preferable that the amount of the threshold T3 may be changed by a user. By setting the threshold T3 as a low value that is close to black as described above, it is possible to determine that the subject pixel 17 is achromatic only when the judgment pixel 19 has a density less than the threshold and therefore appears substantially black. Therefore, it is possible to add a black code only to black pixels. Only black pixels will be printed in black ink monochrome. It is possible to eliminate color misalignment in black images and to output well-defined black images.

[0219] On the other hand, by setting the threshold T3 as a comparatively high value, it is possible to determine that the subject pixel 17 is achromatic even when the judgment pixel 19 has a certain degree of lightness and appears gray. In this case, it is possible to add a black code not only to black pixels but also to gray pixels. It is possible to print in black ink monochrome not only for black pixels but also for gray pixels. Even if color misalignment occurs at gray pixels on the edge or fine-line part, the color misalignment can be eliminated, and a well-defined gray image can be obtained.

[0220] As described above, according to the fine line detection processing of S23, three pixels 22 (a lowest-brightness pixel, a second lowest-brightness pixel, an a third lowest-brightness pixel) are extracted from nine pixels in the subject area 18 that is centered on the subject pixel 17. It is then judged whether or not the extracted three pixels 22 are connected with one another. If the extracted pixels 22 are judged to be in a connected state, the subject pixel 17 can be determined as a pixel of a fine-line part.

[0221] In other words, the processes of S126-S128 may be omitted from the fine-line detection process of S23. In this case, if the judgment in S125 is affirmative (yes in S125), the process directly proceeds from S125 to 5129. It is possible to easily detect a fine-line part in an image, for which detection is difficult.

[0222] It is noted that fine-line parts in an image are often characters that are composed of consecutively-linked pixels and that are of a deeper density than the background color. Normally, such fine-line parts tend to be detected as pixels of a lighter density than their actual density. Consequently, if a fine-line part were processed in the same way with other image parts, this will cause a deterioration of the fine-line part contrast. If a threshold that is used during a binarization process for binarizing print data into dot-forming data or non-dot forming data were set low in order to improve the character contrast, this will adversely affect other image parts.

[0223] However, according to the present embodiment, by detecting a fine-line part, it is possible to process the fine-line part separately from other image parts, and to improve the contrast of the fine-line part relative to the background, without adversely affecting other image parts.

[0224] Especially, according to the present embodiment, an intermediate value is calculated from the minimum and maximum values of the brightness component Y of the pixels in the subject area 18. Pixels 23, whose brightness component values are smaller than the intermediate value, are detected in the image subject area 18, and the number of the detected pixels 23 is counted. If the counted number of the detected pixels 23 is smaller than the predetermined number (4), the subject pixel 17, which has been judged as being in the connected state, is determined as being a fine-line pixel.

[0225] It is noted that in the subject area 18, the extracted pixels 22 with low brightness component values will possibly be in a connected state not only in the case where the pixels 22 are in a fine line, but also in the case where the pixels 22 indicate a halftone image. However, through the processes of S126-S128, it is possible to accurately judge whether or not the extracted pixels 22 constitute a fine-line based on the number of the pixels 23 with a brightness component value smaller than the brightness component intermediate value. It is thus possible to prevent pixels indicative of a halftone image from being erroneously detected as fine-line pixels, and to determine only fine-line pixels accurately.

[0226] In this way, in order to verify whether or not a significant difference exists between the density of the three extracted pixels 22 in a connected state and the density of the non-extracted pixels, the brightness intermediate value is taken as a threshold, and the number of pixels 23 whose brightness is lower than the intermediate value in the matrix area 18 is counted. The counted number of the pixels 23 is compared with the predetermined number (4) It is therefore possible to verify whether or not pixels 22 in the connected state are fine-line pixels.

[0227] It is noted that in the present embodiment, the predetermined number, with which the number of the detected pixels 23 is compared, is four. However, the predetermined number may be set to numbers other than four.

[0228] Especially, according to the present embodiment, the image subject area 18 is a 3-row×3-column matrix area centered on the subject pixel 17, and three pixels 22 with low brightness component values are extracted from this 3-row×3-column matrix area 18. Then, if those three extracted pixels 22 include the subject pixel 17 and are connected vertically, horizontally, or diagonally, the three extracted pixels 22 are judged to be in a connected state. The 3×3 matrix subject area 18 is an appropriate area for detecting a fine-line pixel, and it is possible to identify a fine-line pixel easily.

[0229] Moreover, an identification number is assigned to each pixel in the 3-row×3-column matrix area 18. Among the ID numbers assigned to the pixels, the median value is assigned to the subject pixel 17. Also, identification numbers are assigned so that the total values of three pixels aligned vertically, horizontally, and diagonally, centered on the subject pixel 17, are the same with one another. Then, if the total of the identification numbers of the three extracted pixels 22 is that same number, those three extracted pixels 22 are determined as being in a connected state. It is thus possible to easily judge whether or not the extracted pixels 22 are in a connected state. The processing is therefore simple, and fine-line part pixels can be detected efficiently.

[0230] According to the present embodiment, when a fine-line pixel 17 is determined to be an achromatic pixel, the color of the subject pixel is outputted as black. In general, pixels of a fine-line part tend to be detected as of lighter densities than their actual densities. Therefore, if the color to be outputted for a fine-line part pixel were determined on the basis of the original RGB data, the fine-line part will be reproduced into a lighter density than its real density. However, according to the present embodiment, when a pixel is determined as a fine-line achromatic pixel, black print data (K2) is used to reproduce the subject pixel. It is therefore possible to improve the contrast of the fine-line pixel relative to the background, and to form a high-quality output image that is faithful to the original document image.

[0231] <First Modification of Fine Line Detection Processing >

[0232] In the above-described fine line detection processing, in S127, pixels 23 with a brightness value smaller than the intermediate value are detected. The extracted pixels 22 are determined to be fine-line pixels if the number of the detected pixels 23 is less than four. However, it is possible to detect, in S127, pixels 24 with a brightness value larger than or equal to the intermediate value as shown in FIG. 13. It is possible to determine that the extracted pixels 22 are fine-line pixels if the number of the detected pixels 24 is six or more.

[0233] <Second Modification of Fine Line Detection Processing>

[0234] Next, a second modification of the fine line detection processing will be described with reference to FIGS. 15 and 16.

[0235] According to this modification, it is verified that the subject pixel 17 in the extracted three pixels 22 in the connected state is a fine-line part pixel by detecting the difference between the average brightness of the extracted pixels 22 in the matrix area 18 and the average brightness of the non-extracted pixels in the matrix area 18.

[0236] The fine-line part detecting processing (S23) of the present modification is the same as that of the embodiment (FIG. 12) except that processes S141 through S143 are provided instead of S126 through S128 as shown in FIG. 15.

[0237] It is now assumed that RGB data for the pixels at coordinates (X1, Y1)-(X5, Y5) are as shown in FIG. 16. If the subject pixel 17 is set at coordinates (X3, Y3) in S121 as shown in FIG. 16, the subject area 18 is set in S122 and the point numbers are assigned in S123 to the pixels in the subject area 18 in the same manner as in the above-described embodiment.

[0238] Then, in S124, three pixels 22 with low brightness are extracted, and it is judged in S125 whether or not the extracted pixels 22 are in the connected state in the same manner as in the embodiment.

[0239] If the extracted three pixels 22 are in a connected state (S125: Yes), the process proceeds to S141, in which a value A1 is calculated by dividing the total of the brightness (Y) values of the three extracted pixels 22 by three (3). Then, in S142, the total of the brightness (Y) values of six pixels 25, which are not extracted in S124 (non-extracted pixels), is calculated, and a value A2 is determined by dividing this total by six (6).

[0240] Because there are six non-extracted pixels as opposed to the three extracted pixels, the average brightness value A1 for the extracted pixels and the average brightness value A2 for the non-extracted pixels are calculated in different fashions as described above. More specifically, in S141, weighting is applied to the calculated brightness total value according to the number of the extracted pixels 22. In S142, weighting is applied to the calculated brightness total value according to the number of the non-extracted pixels 25.

[0241] It is then determined in S143 whether or not the difference (A2−A1) between the values A1 and A2 is larger than a predetermined threshold T. If the difference (A2−A1) between the values A1 and A2 is larger than threshold T (S143: Yes), the subject pixel 17 is determined as being a fine-line pixel, and the addition of a fine-line code to the Y, I, and Q data of the subject pixel 17 is specified in S129.

[0242] It is noted that the value of the threshold T is determined dependently on the resolution of the image, the characteristic of the CCD line sensor 2, and the tolerance. The threshold T may be set to 40 or 50, for example.

[0243] In the example of FIG. 16, in S141-S143, the difference (A2−A1) is determined by calculating the following equation. (3):

A2−A1=(223+223+223+199+199+199)/6−(90+90+90)/3=121  (3)

[0244] In S142, the calculation result 121 is compared with the threshold T. If “121” is larger than threshold T (S143: yes), it is known that a clear difference in density is recognized between the extracted pixels 22 and the non-extracted pixels 25, and therefore that the subject pixel 17 is a pixel of a fine-line part.

[0245] On the other hand, if the difference (A2−A1) between values A1 and A2 is smaller than or equal to threshold T (S143: No), it is known that there is no significant difference between the density of the extracted pixels and the density of the non-extracted pixels. Accordingly, it is determined that the subject pixel 17 is not a fine-line pixel. In this case, the processing flow proceeds directly to S130.

[0246] Accordingly, a one-dot fine line, which is difficult to detect by the edge part detection, can be detected accurately, and fine-line image data that is read as a lighter color due to the influence of peripheral images or other colors in the original document, can be corrected appropriately. It is thus possible to improve the contrast of black characters, and to obtain a high-quality output image, without adversely affecting other image parts.

[0247] In this way, according to the fine line detection processing of the second modification, the difference between the average brightness of the extracted pixels 22 and the average brightness of the non-extracted pixels 25 is calculated. If the calculated difference is larger than the predetermined threshold T, the subject pixel 17, which has been judged to be in a connected state, is determined to be a pixel of a fine-line part.

[0248] Thus, when the subject pixel 17 in the pixel subject area 18 is in a connected state, if the extracted pixels 22 have a significant difference in density from the background, the subject pixel 17 is determined as a pixel of a fine-line part. If the extracted pixels 22 are not fine-line part pixels, even if they are judged as being in a connected state because they are halftone or because of color bleeding, it is possible to prevent the subject pixel 17 from being erroneously determined as a pixel of a fine-line part.

[0249] According to the second modification, the total of the brightness component values of the extracted pixels 22, and the total of the brightness component values of the non-extracted pixels 25, are calculated. Then, weighting is applied to the calculated totals according to the number of extracted pixels 22 and the number of non-extracted pixels 25. The difference between the weighted totals is taken as a difference value, and is compared with the predetermined threshold. Because the difference value is calculated taking account of the number of the extracted pixels and the number of the non-extracted pixels, an appropriate result can be obtained as a result of comparison with the threshold. It is possible to improve reliability of detection.

[0250] <Third Modification of Fine Line Detection Processing>

[0251] It is possible to combine the fine-line detection processing of the above-described embodiment and that of the second modification.

[0252] That is, as shown in FIG. 17, the processes of S141-S143 may be added between the processes of S128 and S129 in the fine-line detection processing of the embodiment of FIG. 12. In this case, when the judgment in S128 is affirmative (yes in S128), the processes of S141-S143 are executed. When the judgment in S143 is affirmative (yes in S143), the process proceeds to S129.

[0253] In this modification, the subject pixel 17 is judged as being a fine-line pixel only when the number of pixels 23 with a brightness value less than the intermediate value is less than four and the difference (A2−A1) between the average brightness A1 of the extracted pixels 22 and the average brightness A2 of the non-extracted pixels 25 is greater than threshold T.

[0254] More specifically, in S126, an intermediate value is calculated from the minimum and maximum values of the brightness components of pixels in the pixel subject area 18. In S127, the number of pixels 23, whose brightness component value is smaller than the intermediate value in the pixel subject area 18, is counted. In S128, the counted number is compared with the predetermined number (4) of pixels. Next, in S141-S143, the difference (A2−A1) between the average brightness of the extracted pixels 22 and the average brightness of the non-extracted pixels 25 is calculated, and this difference value is compared with the threshold T. Then, if the results of both comparisons show that the detected number of pixels 23 is smaller than the predetermined number (4) of pixels, and the calculated difference value (A2−A1) is larger than the predetermined threshold T, the subject pixel 17 is determined to be a pixel of a fine-line part. Thus, fine-line part pixels can be identified accurately.

[0255] Fine-line pixels are often part of characters. Characters are often of an achromatic color of deep density, such as black. If achromatic pixels of deep density were outputted inadvertently in a color image due to an incorrect judgment, this will give a marked effect on the image. However, according to this modification, fine-line part pixels can be identified with high accuracy. It is possible to provide high-quality images more reliably.

[0256] <Fourth Modification of Fine Line Detection>

[0257] In order to determine whether or not the subject pixel 17 is a fine-line pixel, it is possible to employ any methods of detecting a difference in density between the extracted pixels 22 and the non-extracted pixels 25, other than those of the above-described embodiment and modifications.

[0258] For example, weighting may be applied to the total of the brightness values of the extracted pixels 22 and the total of the brightness values of the non-extracted pixels 25 according to a ratio of the number of the extracted pixels 22 to the number of the non-extracted pixels 25. The difference between the weighted total of the extracted pixel brightness values and the weighted total of the non-extracted pixel brightness values is then determined. Whether or not the subject pixel 17 is a fine-line pixel is determined based on the value of the difference.

[0259] While the invention has been described in detail with reference to the specific embodiment thereof, it would be apparent to those skilled in the art that various changes and modifications may be made therein without departing from the spirit of the invention.

[0260] For example, in the above-described embodiment and modifications, RGB color data read by the CCD line sensor 2 is inputted from the A/D conversion circuit 3 to the CPU 91, and then stored in RAM 93. However, RGB color data may be inputted from the A/D conversion circuit 3 directly to the RGB data conversion circuit 95 via an input port. It is possible to prevent a large quantity of image data from being inputted to the CPU 91. The control load of the CPU 91 can be reduced.

[0261] In the above-described embodiment, a black code is added directly to YIQ data of the achromatic character pixel. However, a black code may be stored in correspondence with the pixel coordinates of the black-character pixel. Because the pixels in the image are managed by means of the coordinates, by storing the black code in correspondence with the coordinates of each black-character pixel, it is no longer necessary to determine the addition of black codes during each image data conversion process of S13 or S14. The entire process can be executed efficiently.

[0262] In the above-described embodiment, each RGB data set is converted into a set of YIQ data that includes one brightness data (Y) and two chroma data (I) and (Q). However, RGB data may be converted into another set of data that includes at least one brightness data and at least one chroma data.

[0263] The fine-line detection according to the above-described embodiment and modifications can be applied to various image processings other than the black character detection process of S11. That is, the processes of S21-S23 may be executed during processes other than the black character detection process of S11. Any desired image processes can be executed after the process of S23 is executed.

[0264] The processes in the achromatic area judging processes of S26-S32 may be modified in various manners. 

What is claimed is:
 1. An image processing device, comprising: data receiving means for receiving a plurality of sets of digital input signals for a plurality of pixels that constitute a desired image; subject area setting means for setting a subject area that is formed from several pixels that include a subject pixel to be processed and that are arranged adjacent to one another, the subject pixel being located at a center of the subject area; pixel extracting means for extracting, from the subject area, a first predetermined number of pixels while remaining a second predetermined number of pixels not extracted in the subject area, each of the first predetermined number and the second predetermined number being greater than one, the total number of the first and second predetermined numbers being equal to the total number of the several pixels within the subject area, brightness of the extracted pixels being smaller than or equal to that of the non-extracted pixels; connected-state judging means for judging whether or not the extracted pixels are connected; and fine-line part determining means for determining that the subject pixel is in a fine-line part when the extracted several pixels are judged to be in a connected state.
 2. An image processing device as claimed in claim 1, further comprising: intermediate value calculating means for calculating an intermediate value between a minimum value and a maximum value of the brightness of the pixels within the subject area; pixel-number detecting means for detecting the number of pixels, whose brightness is smaller than the intermediate value, within the subject area; and pixel-number comparing means for comparing the detected number of pixels with a predetermined pixel-number, wherein the fine-line part determining means determines that the subject pixel is in a fine-line part when the extracted pixels are judged to be in a connected state and the detected number is smaller than the predetermined pixel-number.
 3. An image processing device as claimed in claim 1, further comprising: brightness-difference calculating means for calculating a brightness difference between an average brightness of the extracted pixels and an average brightness of the non-extracted pixels; and brightness-difference comparing means for comparing the calculated brightness difference with a predetermined brightness-difference threshold, wherein the fine-line part determining means determines that the subject pixel is in a fine-line part when the extracted several pixels are judged to be in a connected state and the calculated brightness difference is greater than the predetermined brightness-difference threshold.
 4. An image processing device as claimed in claim 3, wherein the brightness-difference calculating means includes: total calculating means for calculating a first total of the brightness component values of the extracted pixels and a second total of the brightness component values of the non-extracted pixels; weighting means for applying weighting to the calculated first total according to the number of the extracted pixels and for applying weighting to the calculated second total according to the number of the non-extracted pixels, wherein the brightness-difference comparing means determines a difference between the weighted first total and the weighted second total as the calculated brightness difference, and compares the brightness difference with the predetermined brightness-difference threshold.
 5. An image processing device as claimed in claim 1, further comprising: intermediate value calculating means for calculating an intermediate value between a minimum value and a maximum value of the brightness of the pixels within the subject area; pixel-number detecting means for detecting the number of pixels, whose brightness is smaller than the intermediate value, within the subject area; pixel-number comparing means for comparing the detected number of pixels with a predetermined pixel-number; brightness-difference calculating means for calculating a brightness difference between an average brightness of the extracted pixels and an average brightness of the non-extracted pixels; and brightness-difference comparing means for comparing the calculated brightness difference with a predetermined brightness-difference threshold, wherein the fine-line part determining means determines that the subject pixel is in a fine-line part when the extracted pixels are judged to be in a connected state, the detected number is smaller than the predetermined pixel-number, and the calculated brightness difference is greater than the predetermined brightness-difference threshold.
 6. An image processing device as claimed in claim 1, wherein the plurality of pixels are arranged both horizontally and vertically in the desired image, and wherein the subject area setting means sets, as the subject area, a 3-row×3-column matrix area, in which nine adjacent pixels are arranged in three rows and in three columns, the subject pixel being located in the center of the 3-row×3-column matrix area, each row extending horizontally and each column extending vertically, wherein the pixel extracting means extracts, from the subject area, three pixels, while letting the remaining six pixels be not extracted, brightness of the three extracted pixels being smaller than or equal to brightness of the non-extracted six pixels, and wherein the connected-state judging means determines that the three extracted pixels are in a connected state when the three extracted pixels include the subject pixel and are connected with one another in either one of a vertical direction, a horizontal direction, and a diagonal direction.
 7. An image processing device as claimed in claim 6, further comprising identification number assigning means for assigning nine different identification numbers to the respective pixels within the 3-row×3-column matrix area, with a median value in the nine identification numbers being assigned to the subject pixel, the total values of the identification numbers assigned to first, second, third, and fourth groups of three pixels being equal to a predetermined total value, each group having three pixels including the subject pixel, each group of three pixels being aligned in one direction with the subject pixel being located at the center of the three pixels, the first group of three pixels extending horizontally, the second group of three pixels extending vertically, and the third and fourth groups of three pixels extending diagonally; wherein the connected-state judging means determines that the extracted three pixels are in the connected state when the total of the identification numbers assigned to the extracted three pixels is equal to the predetermined total value.
 8. An image processing device as claimed in claim 1, further comprising: achromatic determining means for judging whether or not the subject pixel is achromatic; and black outputting means for outputting black at the subject pixel when the subject pixel is determined as achromatic by the achromatic determining means and the subject pixel is determined as being in the fine-line part by the fine-line part determining means.
 9. An image processing method, comprising: receiving a plurality of sets of digital input signals for a plurality of pixels that constitute a desired image; setting a subject area that is formed from several pixels that include a subject pixel to be processed and that are arranged adjacent to one another, the subject pixel being located at a center of the subject area; extracting, from the subject area, a first predetermined number of pixels while remaining a second predetermined number of pixels not extracted in the subject area, each of the first predetermined number and the second predetermined number being greater than one, the total number of the first and second predetermined numbers being equal to the total number of the several pixels within the subject area, brightness of the extracted pixels being smaller than or equal to that of the non-extracted pixels; judging whether or not the extracted pixels are connected; and determining that the subject pixel is in a fine-line part when the extracted several pixels are judged to be in a connected state.
 10. An image processing method as claimed in claim 9, further comprising: calculating an intermediate value between a minimum value and a maximum value of the brightness of the pixels within the subject area; detecting the number of pixels, whose brightness is smaller than the intermediate value, within the subject area; and comparing the detected number of pixels with a predetermined pixel-number, wherein the subject pixel is determined as being in a fine-line part when the extracted pixels are judged to be in a connected state and the detected number is smaller than the predetermined pixel-number.
 11. An image processing method as claimed in claim 9, further comprising: calculating a brightness difference between an average brightness of the extracted pixels and an average brightness of the non-extracted pixels; and comparing the calculated brightness difference with a predetermined brightness-difference threshold, wherein the subject pixel is determined as being in a fine-line part when the extracted several pixels are judged to be in a connected state and the calculated brightness difference is greater than the predetermined brightness-difference threshold. 